package com.atguigu.gulimall.product.valid;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author 李涛
 * @date 2020-07-11 17:11
 */
public class ValidNameContraintValid implements ConstraintValidator<ValidName,String> {
    @Override
    public void initialize(ValidName constraintAnnotation) {
    }

    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        return !"".equals(value);
    }
}
